﻿using Sidvall.IdentityManager.Web.Host.Models;
using Sidvall.Web.Security;
using System.Web.Mvc;

namespace Sidvall.IdentityManager.Web.Host.Controllers
{
    public class HomeController : Controller
    {
        #region Public Members

        #region Index

        [HttpGet]
        [Route("")]
        [Route("Index")]
        public ActionResult Index()
        {
            return View();
        }

        #endregion
        #region About

        [HttpGet]
        [Route("About")]
        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        #endregion
        #region Contact

        [AuthenticationMethodAuthorize]
        [HttpGet]
        [Route("Contact")]
        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        #endregion
        #region InvalidUser

        [HttpGet]
        [Route("InvalidUser")]
        public ActionResult InvalidUser()
        {
            return InvalidUser(Sidvall.Security.IdentityStatus.Invalid);
        }
        [HttpGet]
        [Route("InvalidUser/{userStatus}")]
        public ActionResult InvalidUser(Sidvall.Security.IdentityStatus status)
        {
            var model = new InvalidUserModel()
            {
                UserStatus = status,
            };
            return View(model);
        }

        #endregion

        #endregion
    }
}